//
// UAnimationSet.java
// Copyright (C) 2010  "Naush" <naush _ hotmail _ fr>
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as
// published by the Free Software Foundation, either version 3 of the
// License, or (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
// GNU Affero General Public License for more details.
//
// You should have received a copy of the GNU Affero General Public License
// along with this program.  If not, see <http://www.gnu.org/licenses/>./* ----------------------------------------------------------------------------







package org.ryzom.nel.threed;

public class UAnimationSet {
  private long swigCPtr;
  protected boolean swigCMemOwn;

  public UAnimationSet(long cPtr, boolean cMemoryOwn) {
    swigCMemOwn = cMemoryOwn;
    swigCPtr = cPtr;
  }

  public static long getCPtr(UAnimationSet obj) {
    return (obj == null) ? 0 : obj.swigCPtr;
  }

  public synchronized void delete() {
    if (swigCPtr != 0) {
      if (swigCMemOwn) {
        swigCMemOwn = false;
        throw new UnsupportedOperationException("C++ destructor does not have public access");
      }
      swigCPtr = 0;
    }
  }

  public void setAnimationSampleDivisor(long sampleDivisor) {
    nel3dJNI.UAnimationSet_setAnimationSampleDivisor(swigCPtr, this, sampleDivisor);
  }

  public long getAnimationSampleDivisor() {
    return nel3dJNI.UAnimationSet_getAnimationSampleDivisor(swigCPtr, this);
  }

  public long addAnimation(String fileName, String animName, boolean displayMissingFileWarning) {
    return nel3dJNI.UAnimationSet_addAnimation__SWIG_0(swigCPtr, this, fileName, animName, displayMissingFileWarning);
  }

  public long addAnimation(String fileName, String animName) {
    return nel3dJNI.UAnimationSet_addAnimation__SWIG_1(swigCPtr, this, fileName, animName);
  }

  public void build() {
    nel3dJNI.UAnimationSet_build(swigCPtr, this);
  }

  public long addSkeletonWeight(String fileName, String skelName) {
    return nel3dJNI.UAnimationSet_addSkeletonWeight(swigCPtr, this, fileName, skelName);
  }

  public long getNumAnimation() {
    return nel3dJNI.UAnimationSet_getNumAnimation(swigCPtr, this);
  }

  public long getAnimationIdByName(String name) {
    return nel3dJNI.UAnimationSet_getAnimationIdByName(swigCPtr, this, name);
  }

  public String getAnimationName(long animationId) {
    return nel3dJNI.UAnimationSet_getAnimationName(swigCPtr, this, animationId);
  }

  public UAnimation getAnimation(long animationId) {
    long cPtr = nel3dJNI.UAnimationSet_getAnimation(swigCPtr, this, animationId);
    return (cPtr == 0) ? null : new UAnimation(cPtr, false);
  }

  public long getNumSkeletonWeight() {
    return nel3dJNI.UAnimationSet_getNumSkeletonWeight(swigCPtr, this);
  }

  public long getSkeletonWeightIdByName(String name) {
    return nel3dJNI.UAnimationSet_getSkeletonWeightIdByName(swigCPtr, this, name);
  }

  public String getSkeletonWeightName(long skeletonId) {
    return nel3dJNI.UAnimationSet_getSkeletonWeightName(swigCPtr, this, skeletonId);
  }

  public long getChannelIdByName(String name) {
    return nel3dJNI.UAnimationSet_getChannelIdByName(swigCPtr, this, name);
  }

  public final static int NotFound = nel3dJNI.UAnimationSet_NotFound_get();

}
